package com.power.leopard.remote;

import com.power.leopard.common.util.ServiceConfigUtil;

public class ProviderConfig<T> {

	public ProviderConfig(T service) {
		this.service = service;
		serviceInterface = ServiceConfigUtil.getServiceInterface(service.getClass());
	}

	private T service;
	private String url;
	private String version;
	private Class<?> serviceInterface;

	private ServerConfig serverConfig = new ServerConfig();

	public void setService(T service) {
		this.service = service;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getVersion() {
		return version;
	}

	public void setVersion(String version) {
		this.version = version;
	}

	public Class<?> getServiceInterface() {
		return serviceInterface;
	}

	public Object getService() {
		return service;
	}

	public ServerConfig getServerConfig() {
		return serverConfig;
	}

	public void setServerConfig(ServerConfig serverConfig) {
		if (serverConfig != null) {
			this.serverConfig = serverConfig;
		}
	}

}
